package com.sfac.springCloudAdmin.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Test Controller
 */
@Controller
@RequestMapping("/test")
public class TestController {

	/**
	 * 127.0.0.1/test/vueTest ---- get
	 */
	@GetMapping(value = "/vueTest")
	public String vueTestPage() {
		return "index";
	}

	/**
	 * 127.0.0.1/test/thymeleafTest ---- get
	 */
	@GetMapping(value = "/thymeleafTest")
	public String thymeleafTestPage(ModelMap modelMap) {

		modelMap.addAttribute("title", "你好世界!");
		modelMap.addAttribute("checked", true);
		modelMap.addAttribute("myUrl", "http://www.baidu.com");
//		modelMap.addAttribute("template", "test/thymeleafTest");

		return "index";
	}

}
